This should probably just be `os.path.exists`.  I learned just recently that git now supports a .git *file* which can contain directives for where to find the actual data one would expect to find in a .git/ directory.