fix endless loop when locator.location isn't specified

fixes yahoo/locator#5 by removing the relative path calculation, and uses the basename
to exclude "node_modules" and /^\.+/. Plus some minor style tweaks.

todo:
- [x] locator tests pass
- [x] locator-react
  - [x] example works with "location" removed
  - [x] example works with "location" removed and yui-modules dir moved to `examples/node_modules/react-tools`
- [ ] create fixtures, tests
- [ ] verify against other locator apps