I can remove the creation of the temporary directory and force the caller to pass this in. That would make it clearer, thoughts?