added ability to cd into current directory.
Clarified directory changing code.