Add -ptyexport, including new pty framework.