Catch PIL imread problems early and generate error message

This addresses problems seen in #1154 and #1091.
No, forget that... You still use it.