Restore proper working directory.