Changed StringIO unicode conversion to use utf-8