timeout: restore working directory before handling timeout
Many aspects of the gpu hang handling access global state via the current working directory. Rather than pass all of this state down to routines, simply restore the initial working directory.