Fix time calculation/comparison in s3-upload script