Fixing the append and prepend functions to show a diff when there are changes.  #11827
Merge pull request #12713 from garethgreenaway/11827_file_append

Changes to file.py prepend and append.