Avoid writing too many files at the same time

This fixes `fs.js:75 throw err;`