Regression test for reopening $stdout and $stderr.

Checkout: https://github.com/jruby/jruby/issues/1104