Melody, that's pretty much the same way I've had to handle these situations. Short of pulling off the road, what else are you going to do?
The only thing I may have done differently would have been to pass them going my normal speed, or to have sped up to allow that car to pass them. Yeah, they'd be staring at your butt, but you'd be ahead of them. Shaking your head as you pass them at a sane speed is fun too, if you don't think they'd do anything like swerve into you.
I'm a big fan of pretending @ssholes like that don't exist. They want a reaction out of you, and if you ignore them completely, they end up looking really stupid.
Add this to the "Trials and Tribulations of being a Chick on a Bike" list.