setup: Check for gitdir before anything else

Improves #99.