joyent/node — pull request #5088 by raymondfeng (2013-03-19 22:56:18+00:00)
Title: Fix the file mode issue in fs.writeFileSync method

The current implementation of writeFileSync method does NOT pass options.mode to openSync. As a result, the mode is not honored when files are created. The patch will fix the problem. A test case is included too.