Rewrite file opening tests so they are zipsafe
Only run the export-to-yaml test if yaml is available