Simplify the script by not creating an unnecessary build directory and then changing directories to and from it.