always write log files as UTF-8 to avoid cp1252 encoding errors
always write log files as UTF-8 to avoid cp1252 encoding errors

Summary:
The log file should be opened with a defined encoding rather than
whatever the platform default is. On Windows, that might be cp1252,
which throws an encoding error when the text is unicode.

Reviewed By: genevievehelsel

Differential Revision: D26025779

fbshipit-source-id: 0102b2555e91812dfe94a7c332eb896ca2c9ef7e

facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift