cd to the tempdir rather than home when refreshing the directory handle