Remove bad implementation of create-directory-tree
Refactor: rearrange source code