Restore the default-directory after executing special commands that needed it changed.