Add option for not using pty.