Switch from writeFile() to writeFileSync()

Reason: writeFile() truncates instantly, emptying the file for reading.
https://github.com/joyent/node/issues/7807
fs: open(cb) automatically closes.
Nits for the Jail Update