Improve Git repository detection

Respecting the GIT_DIR made it easy for people to hit an error when not
including the .git path component. This ended up causing the custom
`is_repo` function to succeed and then hit an error when an actual Git
command was invoked.

This uses `git rev-parse` with no input which is a no-op but still runs
Git's internal repository checks which should make the check much more
robust.
Version 0.3.1