Capture child exit code

When the child throws an error, capture it an stick into a file whose name is the child PID. Then, in the parent process, if the child exits with a non-zero error code, read in that file to get the child's error. Fail the parent job with the child's error and log it.