Fix the pipe(2) and pipe2(2) so the file descriptors are returned correctly.

The pipe(2) system call returns the file descriptors in registers.  The
pipe2(2) system call copies out the file descriptors.  They are not the
same.