fixing module lookup
remove temp file writing, add 'isimport' flag to modules