Fix some issues with printing UTF-8 log files on Heroku.