Backport fix for FileChooser portal
FileChooser portal: properly convert filenames from string to bytearray