I'm missing is a compression program that will be intelligent enough to know that mimetype does not need to be compressed, and powerful enough to compress the rest of the files with a high compression ratio.
Funny you should say that. I am currently working on just a program. It takes the name of the epub you want to create, the name of the directory holding all the files and creates the zip. the mimetype is added first (stored) and then all the files it finds are added. It searches all found subdirectories as well. It only creates the zip, it will not add or replace files in an existing zip (epub). The code is rough at the moment but I tried it on few unzipped epubs and it appeared to work. It's written in FreePascal and I have w32 and Linux executables. It might be useful to someone else. It will be useful to me.