MB 25: Safe Place - Other Seforim and writings can be brought in if they are in a case. Some say that we still require a case within a case to enter a lavatory, as with Tefilin. A Sefer Torah is always forbidden to bring in. The Sha'arei T'shuvah writes that those that place amulets on their children should be careful to place them in double cases because children will not remove their amulets before using the bathroom.
Binyamin Rudman
Siman 43. The laws of how to conduct one's self with Tefillin when entering a bathroom
43:8. If one forgets that he is wearing Tefillin on his head and begins a bowel movement, then he should place his hand upon them (26) until he finishes the first piece, then leave and take off his Tefillin before going back.
MB 26: Until he finishes - because pulling a piece back into himself brings a person to dropsy [Jastrow][disease in which watery fluid collects in cavities or tissue of the body - Concise Oxford Dictionary], and urine in the urinary duct which is forced back brings a person to jaundice.
43:9. It is permissible (27) for a doctor to take a urine pot while wearing his Tefillin - but a careful person will be strict on himself.
MB 27: For a doctor to take etc. - To check an ill person with it, and he need not take off his Tefillin. And the usual case involves a doctor, but the law is the same for anyone.