'Downloads the course or library in tarball form.'

def download_tarball(self):

    tarball_url = self.q(css='#download-exported-button')[0].get_attribute('href')
    (good_status, headers) = self._get_tarball(tarball_url)
    return (good_status, (headers['content-type'] == 'application/x-tgz'))
