Enable print_method_wrapper to output to an existing stream

Add `output_stream` keyword to `print_method_wrapper`, so that output can be directed to an existing stream such as an open file-handle, or `StringIO`.