Allow ./pants run and ./pants repl to emit to the console.
Fix console output in various cases.