Nit: we use exports.stat() here but just plain stat() below in writeFile().  I actually sort of like this form better -- it's harder to miss that this is not the low-level fs version.  (Even so, I had to squint at this code for a moment to convince myself that we weren't forgetting to call _mapError() in any cases).