Module build script improvements