Make grit compatible with git projects using the gitfile repository format

This format has been used for git submodules as of 1.7.8.

See 'man gitrepository-layout' for more information.

Feel free to ignore this request if you don't care about compatibility with git 1.7.8+ (the README specifies that the tests run against 1.7.2.1).