Added test case for requirejs and some code cleanup

tern only provide hints for require modules that fill exports...  So I
created a couple of files for testing this scenario and log an issue
with tern