Fix for case when self.temp_dir is not set