Fixed sudo and chdir issue, and a typo.