directory copying improved