add createSubFolders option

And added unit tests for the functionality
Fixes #154
Should we document this one ? The boolean is here only because we expose the whole options object, it won't be used after the call to `file(name, data)` : the sub folders are already created. I think this will only confuse users.
I'd rather have an undocumented flag than documenting one only to document its removal.