Check writable flag rather than for null resource
Check writable flag rather than for null resource

Also null resource when writing in watcher callback fails. Fixes #20.

amphp/byte-stream,amphp/stream