Fix #247 - sh.cwd() not updating cwd on success, with test.
Deal with all other uses of this.cwd etc and convert to pwd() on current shell instance.
Merge pull request #248 from humphd/issue247

Fix #247 - sh.cwd() not updating cwd on success, with test.