Test for #577
don't use xrange, has_key, fixes #577
test cleanup: don't mask file builtin, data is unused
Merge pull request #578 from wiredfool/xrange

Python3 issues in JpegImagePlugin