moved dup2 calls to the child process
*
fixed merge conflicts
re-implement piping now that I actually understand dup2