isdir('.git') is never correct.

this doesn't solve the breakage when setup.py isn't in the cwd, but that
can wait.