changed script so that input images are taken image folder and outputs are written to output folder.