Fixes regarding writing to zip files and adding tests for that and mef export.