Trying out some mods to this. Seems like speed is an issue with git rev-parse
Changed find_git_branch to use rev-parse and find_git_dirty to use diff-files for speed (I think). Also removed preceding space in front of branch, and changed function syntax to to what the Git shell scripts use.