Deal with multiline environment variables in tests

If an environment variable has newlines in it, some of our own tests would
break due to the way we compare the output of reports with golden results.
Mangle the output of kyua a bit more so that our comparisons work.

Discovered by Travis CI builds where the non-root environment has changed
and now includes a rvm_debug environment variable that contains a function.
(Looks bogus on their side.)