path.walk and path.dir takes directory object as its argument
corrected environment scope into which module is imported