Add preBuild hook for addons (Resolves #2410)

This creates a preBuild hook for add-ons, based on the work that was done for creating a postBuild hook. #1215

As noted in #2410, an example use case for this feature might be when there are file checks or manipulations you need to make prior to the build process.