Fix directory copying.