Added a dependency on open4 to get STDIN pass-through working on MRI.
Don't join on the stdin pass-through thread.

Since the thread would otherwise block forever waiting for user input, we'll wrap it in a timeout and loop checking the status of the sub-process STDIN pipe. This should prevent runaway thread growth.