Don't touch unchanged file for in-place edit.

This fixes llvm.org/PR15087.