Add 'sg version' cmd and fix setting of commit
Created by: mrnugget
Adds a sg version
command and fixes how we check whether the directory is dirty. The check before only checked for unstaged changes. This one here checks whether there's anything changed: staged or unstaged.