Better Unicode handling

This fixes a long-standing issue on Cygwin where Unicode-encoded error
messages from stderr were unable to be written to the ASCII-encoded
build log.  The messages are now explicitly converted to ASCII with
untranslatable characters ignored.
Merge pull request #228 from hashdist/ahmadia/unicode_fixes

Better Unicode handling -- Fix #153