Adding copyDirectory() function
Using copyDirectory() in clone and update scripts