Rewriting require to allow for relative paths within a module

Reviewed by Bryan Higgins <bhiggins@blackberry.com>