Changed from niallo's pty.js exit-code reporting fork to echoing the exit code and reading it from the pty output. The fork wasn't working on Ubuntu 12.04.3 with Node 0.10.22