[FIX] Recover global state after test_util.py (#5824)
[FIX] Recover global state after test_util.py (#5824)

In test_util.py, a program exit is simulated to test
that the error throwing behaviour is accurate.
Unforunately, this also deletes necessary global state
and so all subsequent tests that run and use tempdir
throw the same error.

This patch is a simple fix to restore the global state
at the end of the test.

Change-Id: I62fef46167e47f6af43271e2ce1db30f54857647
sxjscience/tvm,tqchen/tvm,tqchen/tvm,Laurawly/tvm-1,dmlc/tvm,tqchen/tvm,dmlc/tvm,sxjscience/tvm,Laurawly/tvm-1,dmlc/tvm,tqchen/tvm,tqchen/tvm,dmlc/tvm,Laurawly/tvm-1,Laurawly/tvm-1,tqchen/tvm,Laurawly/tvm-1,Laurawly/tvm-1,dmlc/tvm,tqchen/tvm,dmlc/tvm,Laurawly/tvm-1,sxjscience/tvm,tqchen/tvm,sxjscience/tvm,dmlc/tvm,dmlc/tvm,sxjscience/tvm,Laurawly/tvm-1,sxjscience/tvm,tqchen/tvm,tqchen/tvm,Laurawly/tvm-1,dmlc/tvm,sxjscience/tvm,sxjscience/tvm,Laurawly/tvm-1,sxjscience/tvm