Fix bug with duping fds for plan 9 files