bin/hooks/commit-msg: Add the way to test the hook

In the scripts we need to test that it's out hook that is installed. For
this reason this patch adds a special test case. In case a special
filename is passed to it, it just prints certain string and exists.