Regression test for reopening $stdout and $stderr.

Checkout: https://github.com/jruby/jruby/issues/1104
Merge pull request #1124 from godfat/regression-test-for-gh-1104

Regression test for reopening $stdout and $stderr.