add pipe console stream, fix stdio bugs

this fixes problems from using the uv_tty_t stream type, which I seem to
have misunderstood and shouldn't have been using. it now uses a regular
pipe for stdio.