I'm not sure whether this helps or hinders ...
Good news: calibre has its own utility (rename_files in calibre.ebooks.oeb.polish.replace) for changing filenames inside an epub. This is the help info:
Code:
Rename files in the container, automatically updating all links to them.
:param file_map: A mapping of old canonical name to new canonical name, for
example: :code:`{'text/chapter1.html': 'chapter1.html'}`.
Bad news: All calibre's own epub manipulation relies on using its standard EpubContainer class. Unfortunately kiwidude's Modify Epub plugin pre-dates EpubContainer so it has its own earlier version of a Container class.
I don't know how much work would be involved in getting the ME Container to use calibre.ebooks.oeb.polish.replace.rename_files.
Ideally ME needs a complete overhaul to use pure calibre container functionality for everything ... but that's not a trivial exercise.