updated jython script to process a dir of images