Refactors build script

- Refactors build script to be more clean, readable, and Python-
developer friendly
- Removes all instances of killing kittens
- Some minimal (sane) PEP8 changes and style changes
- create_package_json now uses json.dump and a pure python dictionary
Fix get_revision, small cleanup in build
Fix error messages
Added message on build completion
Merge from master
Merge branch 'b1naryth1ef-cleanup_build_script'