Make setCWD() with bad paths safer
Summary: Ref T10853. This isn't a complete fix, but should prevent the most serious mistakes with setCWD() on bad paths.
- Wrote a script using setCWD().
- Gave it a bad path: got an explicit error.
- Gave it a good path: things worked great.
Reviewed By: chad
Maniphest Tasks: T10853
Differential Revision: https://secure.phabricator.com/D15785