now uses parameters provided on the command line for the image folders rather than being hard coded in the file