use "git rev-parse" to get current commit

Hopefully this will be more stable than parsing "git log".

This line is regularly failing when Jenkins runs the script, but never seems to fail when builds are run manually. It's beyond aggravating. Anyway this seems to be the right way to do the same thing, and it's certainly simpler.