Modified build script to run on both Mac and Linux based