Make Pillow the only supported imaging library.

With the Conda package fixed, I think we can retire the old PIL support. Plus, matplotlib has an optional dependency on Pillow (not PIL), so why not make things simpler...

Also, fix a leaked file handle (only relevant on Python 3, where it causes a ResourceWarning).
Is this available as a context manager?