build.sh: automatically log builds and repo syncs

This will allow people building PA to check their full terminal output in '$DIR/logs' to pin-point errors.