restore working directory if test changes it