Fixed utf-8 file out problem

Default encoding on Python < 3 is ascii and it seems to take every
chance to convert back to it. Should probably start using Python 3 one
of these days.