Force UTF8 encoding during writeLines

This should fix #549 where R writes file according to default locale if not otherwise specified. It caused a problem under Windows due to lack of support for UTF8 locale and rCharts assumes everything will be written in UTF8.