The abort came from using libuv tty handle on non-tty fd. Use uv_pipe_t in these cases. Also add simple test for this case.