Improved commit-msg hook

Stopped hook from acting on branhc names that do not end with a story number.