Cherry-pick from master:

 * Create archive in tmp directory insted of working dir

Change-Id: I39acb068c89dd6e0f781147059641d0bc4f10e57