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.
Merge pull request #9124 from terminalmage/issue9123

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