Mike, you already guessed how to make it impervious to user modification, make it owned by root. That's not 100% foolproof either, but close. The files can just be created, they're never there by default (and on the two distros in particular that *did* provide them default, they still *should* not have been there).
Bigger problem I realized with my own solution: the user *can't* logout before 30 min are up! Or, more precisely the sleep(1) will keep running after the X session has apparently ended - they'll probably get the blank grey X background with no clients, until the 30min is up.
No, there's an elegant solution to this problem I just don't know what it is yet. -Adam