- // Create a temporary directory to store the full source
- td, err := ioutil.TempDir("", "tf")
+ // Create a temporary directory to store the full source. This has to be
+ // a non-existent directory.
+ td, tdcloser, err := safetemp.Dir("", "getter")