Fix encoding issue in tests.

Failed when LANG etc env vars aren't set.