libc: Fix pipe flag logic

When non-blocking, need to OR the flags, not AND them.

David explains:

  The diff below fixes a problem I've been having with Ctrl+C in Node.js
  (Node's signal handler uses a pipe internally when dealing with a signal).
  Without the change, write() was returning EBADF because the FWRITE flag
  wasn't set on the file structure. Node would then assert because it doesn't
  expect that ever to happen.
 
Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: David Halls <dahalls@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>