fix for copying directories.