Example improvements

Since this is my first time working with node, I am not sure if I am adding the pty.js dependency right.
Furthermore, pty.js can only be installed directly from git (not available in npm repos).