Fix for .git directory testing on subdirs