Correct redirection
Issue #2
new
An analogical problem and the solution is described at https://stackoverflow.com/questions/19145183/redirecting-pythons-stdout-to-the-file-fails-with-unicodeencodeerror.