pub fn with_temp_dir<F: FnOnce(&TempDir)>(callback: F) -> Result<()>
Runs a closure with a temp dir argument.