methods process.stdout.write, process.stderr.write

Add ‘write’ methods to process.stdout/stderr which simulate the
corresponding methods in node.

The new ‘write’ methods can handle:
1. Simulating printing without a new line
2. Control chars (‘\r’, ‘b’, ‘\n’)
3. Use console.log / console.error as proxies for stdout.write /
stderr.write