use appropriate tmp dir