check if directory is a git repo