Encode unicode as UTF-8 before passing it to cStringIO

Discovered this while trying to import a scenario in workbench that contained non-ASCII unicode.

@sarina