Change to use the context.emit_print directly

As it is now (at least on 2.9.6) the current method will dump messages into whatever context is open rather than where they should be going, this fixes that.