build: fixed directory handling in build_binaries.sh