Minor, but as a convention to avoid accidentally leaving garbage around, I would write temporary files to a folder like fixtures/tmp. Then, in .gitignore, I would ignore /test/fixtures/tmp. That way if the tests fail, you don't end up accidentally checking in temp files. Also, I would use path.join along with __dirname to make sure the path is correct, in case the current working directory has been changed.

```js
var Path = require('path');
...
fs.writeFileSync(Path.join(__dirname,'fixtures/tmp/test.txt), 'bar');
```