A minute after giving up, it occurred to me to search the BBEdit lists, where I
found the answer. Here is a diagnosis of the problem, my stab at an explanation, and the solution.
I had saved the file with the script encoded as UTF. That means the file had a BOM (Byte Order Mark). Whatever a BOM is, it comes before the #! (I surmise), meaning that the file won't be read as a binary file (I surmise). cat (I surmise) copied that mark so that didn't work either.
Saving the file with a different encoding, UTF without the BOM, solves the problem. My share on the server gracefully disappears after SD is does its thing.