Improved population of variables, first-line error check
used git-branch and sed for branch instead of __git_ps1
pass username and email as argument to commit instead of using config
fail if this is not being run inside a working tree