generating directories and their subdirectories
creating files' enclosing directories before creating the actual files