Fixes issue #1 so the script should run with calibre 1.X.X.