[Bug 1111572] New: patch segfaults if it can't write *.orig