fix -r for directory copy