I've reduced the patch size slightly by using inreplace for the prefix/cellar change.  I don't understand what you mean by the `Pathname.write` reference, since we're patching a larger shell script here -- how can we write it out without the patch?