Fix "Invalid Changes data" in file.replace/blockreplace states

This commit returns the diffs from these two states within a dictionary,
instead of a string, getting rid of a warning that the changes data is
invalid.

Fixes #9123.