Improvements and fixes in repository_addon.py

In particular, improved compatibility with Python 2.6 (zipfile could not be used with 'with' statement)