CommonsJS file: implements copyTree()