Check for the existence of .git

  Switch to checking for the existence of .git, instead of that it's a
directory, as when it's a submodule, it's .git directory is stored elsewhere.