Embedding the tools with customised stdio streams

Expansion of tools and engine in order to permit input, output and error streams to be customised. This customisation permits the shell and runner to be embedded within another Java app (a requirement for [js-engine](https://github.com/typesafehub/js-engine#javascript-engine)).