Arcyd: fix: handle bad unicode commit message

If there are bad unicode characters in a commit message then replace
them with the 'unicode replacement' character.

Exercise this new code with some new tests.

Test Plan: $ ./precommit.sh