cleaned up build script; added build logic for 4.6 alpha