Using encoding for write_file to fix --icon issue as per this link:

https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20131202/1153359.html
Merge pull request #12 from jgoalby/master

Using encoding for write_file to fix --icon issue as per this link: