I believe JARs state that a pilot in command can do anything he deems necessary for the safety of the flight even if it means breaking rules. Ie if you break a rule, you'd better have a darned good excuse! Hmm....would taking a leak qualify? Leave that one for the lawyers!