Fix stderr redirection test on JRuby

On machines with enough cores the write pipe was
getting closed before the redirection thread had
a chance to copy it's contents into it