Support using either pymaging or PIL for tests.

Try to import either pymaging or PIL for the PNG test. Use either of
them, or skip the test if neither is available.
Add missing six dependency to tox.ini.