Safely handle assertions for -O

Issue #1 was open for some time now, so I've addressed it in this pull request.  I've created a wrapper called ``ensure`` that replaces uses of ``assert thing`` outside of tests. This will explicitly raise an AssertionError so it won't be suppressed by ``python -O`` or ``PYTHONOPTIMIZE=``