Fix 'path' variable names in image processing