Just figured this out for myself. You need to use the create folder action for the node-webkit first before writing the file. You can't create a folder on the fly when trying to write the file.
Keyboard On S pressed
1. Node-webkit Create folder NodeWebkit.UserFolder & "gamesubfolder"
2. Node-webkit Write "test" to file NodeWebkit.UserFolder & "gamesubfolder\myfile.txt"
The above will create a subfolder in the userfolder called "gamesubfolder" and will write the file "myfile.txt" in it with the content "test".