Use pty.js to emulate a terminal