document save: guard against empty change set

(integrated from master branch change 83d469e by Todd Whiteman <toddw@activestate.com>)
difflib: update unified regex to allow optional line number count

(integrated from master branch change 670fcf5 by Todd Whiteman <toddw@activestate.com>)