Handle UTF-8 input

Use codecs to open incoming files and write outgoing files as utf-8

Fixes #1