Various cleanups, simplifications etc.
Use os.Pipe() to test Unix FD passing