improved build.sh to not depend on being run from the cwd