Make sure temp files are written and read in utf8 encoding.