shell script to convert a directory of jpegs to an animated gif (depends on ImageMagick)