added copyDir.C from HW 3