makes offlineimap.py more robust