Fix bug where check fails outside of a git repo