Fix error message when stringpatch can't open file

"Could not open 256 for writing!" was a confusing one.
Merge pull request #6013 from tkelman/patch-2

Fix error message when stringpatch can't open file