Modify build script to scan directory for dependencies and dynamically sort out amd vs global scripts.

Remove require.js and instead add a cdn script tag