Fixed issue with copying directories