Fixed bug where the current working directory was changed but
we forgot to change it back.