add createSubFolders option

And added unit tests for the functionality
Fixes #154
Yeah, I was still kind of getting my head around the concepts involved when I was deciding how to re-implement that....  I'm not really sure what you're saying with that second sentence though.