Updated Build Script

Revamped entire script and added support for command line arguments. Use -h (--help) for usage instructions.