Make $tmpdir global.