Attached is v4 of the patch series. Changes from v3: * Don't process stderr if not prefixing stderr (stderr and stdout will refer to the same underlying file if --merge is passed, preserving the previous behavior) * Flush each line of stdout when prefixing to hopefully reduce out-of-order processing of stderr vs. stdout. * Document that --stderr-prefix can cause out-of-order processing, even with --merge. * Re-wrap comments at column 80. * Use `test ...` instead of `[ ... ]`. * Add tests for added terminating newline on final stderr line. * Add some additional comments to the new tests to make them easier to read.