Don't leave behind corrupt directories

Ensure that a system `rm -rf target` will continue to work across test runs.
auto merge of #766 : alexcrichton/cargo/fix-test-state, r=alexcrichton

Ensure that a system `rm -rf target` will continue to work across test runs.