I think it might be better to just write some random text to the test file, so that all versions of glib continue to return "text/plain". Just checking that with upstream, but can prepare a patch.