properly stat submodules since their .git dir is really a file with an index