Adding BOM to file on create

Adding BOM to file on create so it works with UTF-8 chars
Fixing #51 and #59