I was thinking about writing such a thing. Are there any points in the shutdown sequence that would allow for insertion of a custom script? If the answer is no, then I won't bother, as it would probably be overwritten on the next update.