Use the new scoped_pipe::move_write function for dup2-and-closing an fd