tests: don't use GLib.basename, it doesn't copy the input so the output is use after free if the local gets gc'ed.