Suppress PIL resourcewarnings
Handle a few more warnings
Fix doctest errors