This was written and tested around Moodle v2.7. As of Moodle v2.9 by default (and prior to that by selection) the format for course backups was switched from .zip to tar.gz
I have a python v3 version which handles the current tar.gz format in testing.