handle malformed or nonexistent start_sha

Currently, hitting `http://localhost:5000/repos/restfulgit/git/commits?start_sha=qwerty` or `http://localhost:5000/repos/restfulgit/git/commits?start_sha=123456789` results in a 500 error. This fixes that.