Fixed duplicate child directories in copy script.