backup zenpacks during install and add zenpack --sync which reinstalls m...

...issing zenpacks from those backups
There should be a way to do exactly what you say. I haven't created a test case that reproduces that AttributeError case (which is why I haven't dealt with it).