Fix dup/close behavior

This commit reverts 5ad3c3c9f787177b9313605ef05e1b6511224b69 and fixes
the bug it was originally attempting to fix.

As of 5ad3c3c9f787177b9313605ef05e1b6511224b69, we dup IOs and file
descriptors passed to Subprocess. This was to work around an issue where
Subprocess would close files passed to it. However, the fact that
Subprocess closed these files was the actual bug, and the dup'ing
produced all kinds of undesirable behavior.

This change reverts the dup'ing behavior, but instead fixes the bug
where Subprocess would close file descriptors you passed it, making the
dup'ing behavior unnecessary in the first place.