buildd/functions.sh: do not mv files if there was an error