The example on the readme is slightly incorrect, and will result in intermittent failures.

As per the documentation in to.js, it is incorrect to rely on the 'end' event when writing to a file.  Utilize 'close' instead.