Fixup build and prepublish scripts