I have written a command line tool which takes in a directory of images and smushes all the images in that and it's sub directories, downloads the smushed images and replaces them in their respective directories. Read further in my blog post - http://abhirama.wordpress.com/2010/10/20/a-command-line-tool-to-run-smush-it/