Performing Misvot or Preparing for a Misva in the Presence of Filth

It is clear that one may not pray, recite a Beracha, or learn Torah in a restroom or in the presence of bodily waste. But is one allowed to perform a Misva, or to make plans for performing a Misva, in such a place? One example might be Sedaka (charity). Is a person permitted to write checks to charity while in the restroom, or to go over his finances to calculate how much to donate to different…