Modify semantics of getwd

- Change name from getcwd to getwd to differentiate behavior
- Ensure that corresponding setter reflects this change
- Explain semantics of return conditions to caller
- Update unit test to use changed function name