Added checking for .git dir in repo directory.

This ensures that the repo is actually the root of a git repo and will
stop users from accidentally adding an SVN repo as a git repo.