use `git status` to check if it's a repo

not just checking if `.git` exists.

`.git` may be broken, or git may be unavailable.