The former principal of a Perth private school has died suddenly, a day before a court appearance for possessing child exploitation material.