ensure working directory is what it was before to handle symlink folders