You should definitely use `cfg['CFG_TMPDIR']` instead.