Enhanced display of test log output, escaping when necessary