Well, if they don't match, they are not valid files for the data you loaded in the profiler or you did not enable the belonging sets.
The rebuilder acts as a kind of 'add valid files from the source to the given destination'. It scans files (and files in archives) in the source folder(s), matches the crc32/sha1/md5 and size values against the loaded datfile/mame import and creates each instance of matches in the destination. There it uses the correct name then.
So in your example, the rebuilder destination should point to MAME's rom folder (holding the 0.197 sets), while the rebuilder source should holds the files you want to add. Ensure that your loaded profile represents data of the newer MAME version you want to update to, so NOT 0.197).
And keep in mind that the rebuilder is a file based operation. It does not guarantee to create complete sets and it does not update what is wrong the destination...that's a job for the scanner.
So....double check the loaded profile data, the paths and if it still does not work, give me a more detailed example of one file in the source (name, crc32, size, etc)