Don't create folders if there are no files or subfolders contained in the folder, fixes #1.