Fix read-only check.

The read-only check was backwards: it was returning True if the pipe had been opened succesfully in append-mode.  Invert it to get the proper sense.