Hi Andrew,
That's the place. With Bridge, you don't need any special handling for RAW files. Once you get the Metadata Object, it will write to the original file (for files like JPEG), or to a sidecar file (for RAW). You don't need to do anything special.
Have you updated to 1.0.3 yet? There has been a long standing issue about attempting to write metadata before the metadata object has been completely initialized. Many of the strange machinations you see in that script were attempts to ensure the metadata objects were fully initialized. There's about 3 or 4 different approaches in there, but even with all that, there were still occasional problems, especially on large files.
We've already put in the feature request for callbacks for the completion of thumbnail and metadata initialization.
I know they worked on the metadata routines, but I haven't had the chance to test it out yet.
One thing for certain, to get a metadata object, use "synchronousMetadata" as I do in that function. It's more reliable (especially in 1.0 - 1.0.2).
Wish I had a better answer for you. I don't know if PS can do it, as Bridge scripting is my game. I fart around with PS to make Bridge scripts, but am no expert.
Bob
Adobe Workflow Scripting