Handle git submodules

Git submodules do not have a `.git` folder, but instead a `.git` file which tells git where the `.git` folder for the submodule is located within the parent `.git` folder.

Fortunately, git allows us to query directly for the git dir of any repository.