Fix utf8 weirdness on tests

Fixes #629