added checkGitDirs