Discard stdout/stderr of R interpreter processes

Add some rather ugly code to discard the stdout and stderr from the
invoked R interpreters to avoid deadlocks when the interpreter outputs
too much data.