@NevilleHillyer, et al:
I think also it would be well to duplicate the ~/Library/Mail/MessageRules.plist file before performing any script action on it so that you can restore it easily if, after sorting, things go awry with mail rules. If you've got Time Machine backing up your main drive, you could also rely on a Time Machine restore in the event that the newly sorted rules don't perform as expected.
Another thought is that you could open the xml folder and do a search for keywords in the rule you are looking for and then edit/move the rule, or weed out duplicates, within the xml file itself. Again, I advise backing up the original folder before performing any editing of the xml file.