Add encoding argument for output creation functions, change default enco...

...ding to unicode

As it says in the commit message. This may break existing code (mainly python2 code that relies on the interchangeability of bytes and string type, e.g. delete the `u` prefix I added in `__main__.py` to see this in action), but it should be better in the long run.