Fix require() parent directory traversal

This changes some of the require traversal logic to fix #276. Leaves the misleading log discussed in #278 but does also fix up a related code path.

Test result on master before patch:
total ............................................... 861/874

With patch:
total ............................................... 863/876

Per @johnnyman727's suggestion, I've now been using his 'ttt' module in tests, rather than this copy-pasta, e.g.: https://github.com/natevw/tessel-runtime/blob/f08f2832efc924432051c90c10f09573e5c9bbe4/test/suite/net.js