Disallow import outside of module.  Fix tests to support module vs. script testing.