Replace CWD in hash function

Replace the CWD from `what` passed into hash function. Implementing
@bnkr's suggestion in issue #517. All tests pass.