In case anyone else finds this while searching for a way to fix the underscore problem.
Here is my solution for now, though I wonder if a plugin that does something similar couldn't be developed. If I ever take the time to learn how to write plugins for Calibre this will be the first one I tackle. I think a template wouldn't work because the part of the code that replaces the special characters is applied after the template?? If I'm wrong about this that would be great.
Here is a
script that you can run with the export directory path as an argument after exporting the files from Calibre and it will rename them based on the metadata in the opf file. If you want to improve on this and repost it that would be great. I'm sure there is a lot that could be improved.