I had the exact same error. It seems like the save_image function does not create the output_path variable when you are not resizing the images. I could fix it for me by adding these two lines in line 165 (right after the last else statement in the save_image function):
filename = os.path.basename(r'%s' % original_path)
output_path = os.path.join(output_dir, filename)
so the complete else block should read like:
else:
filename = os.path.basename(r'%s' % original_path)
output_path = os.path.join(output_dir, filename)
copy(r'%s' % original_path, r'%s' % output_dir)
return os.path.basename(output_path)
I hope it helps