Added a check to see if the directory has .git