Fix problem where date objects always produce a patch

Add a date reviver to JSON.parse so that dates are stored as Date objects and not as strings.