module: test for directories, fixes require with ..

Given my home-directory is `/Users/rocko` - and I have a file named
`npm.json` in it and also a repository with name `npm`, which is a
folder for the node-module.

When try to require the `/Users/rocko/npm/index.js` two direcotry
levels down in the npm folder (e.g. `/Users/rocko/npm/test/tap`)
with require("../../") node will load `/Users/rocko/npm/index.json`.

When I use require("../..") node will load `/Users/rocko/npm.json`
which is fixed by this commit.

Original PR: https://github.com/joyent/node/pull/7094
It would be good to have a second test that checks that `../../` has the same behavior.

Suggestion: change the file path to a more neutral one, e.g. `test/fixtures/json-with-directory-name-module/module-stub/one/two/three.js`.  The tap/ directory suggests that tap is somehow involved when it's not.