First off I want to say thanks for this script. I was dreading having to do the same, and I love that you used python to do it!
I thought you might want to know about this FF plugin called Chinese pera-kun: http://perapera.wordpress.com/chinesepera-kun/ When its turned on it pinyinizes and gives a short definition of a word or word pair. I stumbled upon it randomly on the internet (chinese-forums.com)