Inefficient, but more accurate handling of printing strings with newline characters.
Simplify io_out handling: use nil as a sentinel instead of os.Stdout.