Test running improvements: all tests can be run with tox; run.py script exits with an error code in case of failures.
better warning messages for fromstring/tostring
fix 2.6 tests by replacing usages of deprecated fromstring/tostring with frombytes/tobytes
fix UnboundLocalError errors
An attempt to fix #15 for Python 3.x.

TiffImagePlugin.ImageFileDirectory.__getattr__ is magical because it deletes items from "tagdata" variable and this plays badly with TiffImagePlugin.ImageFileDirectory.__iter__. Under Python 2.x items() returned a list and this wasn't a problem (because __iter__ value was evalued once); under Python 3.x items() returns a view/iterator that chains self.tags and self.tagdata and iteration begins to fail with "RuntimeError: dictionary changed size during iteration" exception because tagdata item is modified.

In this changeset I've tried to fix this by evaluating items() when the loop starts (by casting it to list), so that it doesn't matter if tagdata is changed during iteration or not.

There is no tests because _getexif is currently private. But this method is used by easy-thumbnails and sorl.thumbnails, so I think it is worth fixing it.
better fix for #15 (with a test case now)
Merge pull request #64 from kmike/master

Testing improvements and better Python 3.x support