GDA-5798: Fix to Jython's StdoutWrapper class when stdout is a PyFileWriter
See the Jira ticket, and the Confluence page it points to, for details