chore(validate-commit-msg): add check for line length

Refactored the code into a unit tested class.