minmax: Only read newer files and write minmax.old

When updating the minima and maxima of several files in minmax,
write old values to minmax.old and do not read older files again.