Change copyDir to copyDirectory and make it static