Pty fix 1

This fixes the issues related to pty by allowing the process to grab the controlling terminal.

Main side effect: stdout and stderr are combined within stdout in the logs. Which is expected as we are dealing with a terminal.

Fixes #327 in the meantime :)