fixed issue with directory permissions on copy #6552
Merge pull request #6571 from bcoca/file_fixes_copydir

fixed issue with directory permissions on copy