Allow setting of git_commit, version, and dirty via shell varables

This is particularly useful if building from a tarball instead of from a
checked out git repo (as all Linux distributions do)
Not sure what you mean... errexit will not trigger inside an "if", so the above will work even if it's a tarball and git_commit is unset in the environment...