Added support for runtime loading of packages

updated loader.js, added test case to LoaderTest.js, and moved the
loader test js files into a subdirectory.