Double check mesh in write_equation_systems

This fixes and adds an assert which would have caught a bug in misc ex10.  The bug was less astonishing than the fact that no person nor assertion had caught it yet.

Going to merge this right after MooseBuild reassures me that none of our other examples and tests have the same flaw.