add createSubFolders option

And added unit tests for the functionality
Fixes #154
This code comes from the previous version where all the folders where created. Now (even with this patch) we can get no result (`file` is undefined) for a "virtual" folder but files in it (`file("sub1/file.txt").remove("sub1")` for example). In that case, we have should keep the existing code and look for content to delete.