Minor tweaks to the version.sh fixes from last commit.
Add back a check for whether the git program exists. Don't show distance if it is zero. Remove the dirty flag. Remove the initial "g" prefix from the commitid. This is added by git describe, but I don't think we need to preserve it.
Showing with 8 additions and 5 deletions