Don't try to be clever and File.open(stdout) anymore.

This gives an EBADF error if stdout is a pipe, apparently.  Now it's
more verbose code, but also runs correctly. :-)

Auditors: eater

Test Plan:
make exercises
succeeds instead of failing with EBADF