Fix execution of build_dirs.sh in various scripts.