update docs && comments, fix logic errors, pwd() returns references
Merge pull request #13 from yetanotherhacker/fixmebaby

update docs && comments, fix logic errors, pwd() returns references