Fix saving nonascii to file on python2.7