External scripts

Move the various build scripts and build rules out of the project file and into their own files.
Should result in less churn in the project file, and make functionality more obvious.