Why are you using scripts to unzip them?
You can change the filename to .zip and unzip that way.
Then when done you can rename the file with the extension idml.
It should open.
Zip package and manual zip and unzip is irrelevant to my question.
Even just the exported IDML is not opening back in InDesign. It always crash.
Then there is something more sinister going on.