Fix test repo dir not deleted after running

Fix test fail on Windows.