select temporary directory based on env vars