Add a test to make sure invalid UTF-8 is caught.

Exercises the failure case in #1, but checks for a replacement character.
Ran gofmt too.