Check for .git existence, not whether it's a directory.

This ensures that correct (i.e. git tags-based) version detection is also used
when bakefile repository is a submodule inside some other git repository as
.git is a file and not a directory in this case.