Calibre expects ePub-files to be zip-compressed.
If you right-click (or control-click) on the file and get the option to "Show Package Contents", the file is
actually a folder.
You can simply choose "Compress" from the context menu in Finder. This will create a "name.epub.zip" file. Now
rename it to "name.epub" and add it to Calibre!
No script necessary