Fix usage of 'drain' event on fs.write()

The 'drain' event only fires if fs.write() returns false,
not every time something is drained to the filesystem. Also
switch to doing it 'once' not every time.

Fixes #395