Thanks, MacDafydd, pholy, this pointed me in the right direction(s). I had the same "container.xml resource is missing" error.
Using MacDafydd's terminal code left me with the .DS_Store file in the EPUB package, so this worked for me:
zip -q0X Filename.epub mimetype
zip -qXr9D Filename.epub META-INF OEBPS -x \*.DS_Store
|