removed needless flush from output.py
fixed shadowing of variable
expired repos are saved in json instead of shelve
full Python 3 support added