Support for interactive commands such as Rails console

The original piping to bash doesn't work so well when it comes to preserving the pty as stdin becomes the actual script.