Bug 914352 fix crash when invalid path given to fs.writeFile