Updated build script for building distributions.