add support for custom stdout and stderr

I found myself needing commander in a web shell where stdout and stderr are piped back to the javascript context.
This is a simple change and the defaults are what you expect.