Fix build_toolchain.sh to create temporary directories