improved directory handling
implemented adding of directories as subtree