cf-upgrade should not close STDOUT of all forked commands

Now both STDOUT and STDERR of forked commands go to STDOUT and STDERR of
cf-upgrade. Previously it was just closed and e.g. dpkg was failing
because of that.

Modify the test scripts to actually test that.
Reopening STDOUT with the handle to the file, I mean.