Hi, did you know you can already do that in PM?
There are two ways to do that, the second one is even easier (but AFAIK works only on Mac)
4.6.x has a feature called Load Selection (and correspondingly - Save Selection), which simply loads a text file with one filename per line, highlighting the matched filenames in the current contact sheet. You would have to rework your script a little bit, and it only works in the currently open contact sheet AFAIK (although you can open several folders into just one contact sheet).
The file looks like this:
filename1.jpg
filename2.jpg
so if your script would strip the jpg part and put there the raw suffix, it should work out quite well. Give it a try. Even with the overhead of opening a big contact sheet of several thousand photos from several folders into one, it should be faster than Lightroom
Second way, if you are on Mac OS X, Photomechanic can leverage OS X's integrated Spotlight search feature in excellent way. You would simply open PM, go to Edit menu and select Search...
Search dialog pops up, and you can paste your string of filenames with commas inbetween into the query box, with "filename contains any" search criteria. In the dialog you can also limit the search to specific locations, or search the whole disk. If you have totally unique filenames, you can let it search the whole disk, as there is really no overhead as the searching is done by Spotlight's internal database - ie very quickly.
If you are using Windows, the first method would still work for you. And I am sure with PM Catalogue coming in v5, things will be even easier for those unwilling/unable to use Spotlight.