Add tests for pre-commit and commit-msg hooks