fixed race condition when generating Packages.gz.
Merge pull request #19 from abecciu/fix-race-condition

fixed race condition when generating Packages.gz.