doc/Makefile: add the -d
Fix the check for .git and .bzr in doc/Makefile