Fixed D4ScriptEngine to flush the output stream.