Don't break when pushing things other than branches.

* Tags would crash the hook
* Also, adding an extra test to block_duplicate_commit_message