Add support for pty allocation before executing a command.

Signed-off-by: René Köcher <shirk@bitspin.org>