Improve handling of ZIP files in Python 2
Stylistic fixes