Fix bug in computation of path to .git folder
Fix bug in computation of path to .git folder

The code returned a wrong path if it was pointed to either a directory
that didn't have a git repo in it or to a directory that doesn't yet
exist.

Haacked/SeeGit