use __dirname as base for tmp and cache dir