Fix script to generate tarballs