fixed test for IOErrors from PIL/Pillow