Fix sync_modes download and build with multiple packages

The functions `download_tarball()` and `build_package()` return early if `sync_mode` is download and build respectively. Since calling `clean_exit()` also breaks the `process_targets()` loop, return a non-zero value instead and if one of them does not return zero the loop continues with the next iteration.