apply-deltas.sh: Improved error checking