Fix to test if .git directory exists