Added a check to remove path sep on end of provided image folder