Fix directory copy and rename support.