$zip->addFile($tmpFile, basename($file));
заменить на
$zip->addFile($tmpFile, iconv("utf-8", "cp866", basename($file)));
$zip->addEmptyDir($internalDir.$dirname);
заменить на
$zip->addEmptyDir(iconv("UTF-8", "cp866", $internalDir.$dirname));
$zip->addFile($tmpFile, $internalDir.$filename);
заменить на
$zip->addFile($tmpFile, iconv("utf-8", "cp866", $internalDir.$filename));