pty support. fixes #28.