Fixes locating the git directory in submodules