Fixes issue where filename and directory name conflicts during extraction.