Refactor 'build-installers' script