Fix to detect .git/ dir within git submodule directory