Write sync

Reason: writeFile() truncates instantly, emptying the file for reading.
joyent/node#7807