Handle critical exception logging correctly in localized systems

Python generates certain exception messages (like IOError) in system
language, if locale is set. This ensures that the message is properly
converted to unicode in Python 2.
Merge pull request #874 from avaris/non-ascii-error

Handle critical exception logging correctly in localized systems