Store intermediates in a temporary directory.

This limits changes to the crate directory, and reduces the chances that
an unwanted intermediate will accidentally get checked in.

Bug: 339424309
Test: cargo test, ran on some crates
Change-Id: Ife96614e0a4986dbc5db4c6b8bffedf04d8b7c94
2 files changed