small fix for tmp dir handling