fix tests.
handle xdgmime file types which differ from those of libmagic.