Set UTF-8 for writing EPMs

Fixes #52.