Sws2rst updates

Updates so that hopefully now doctests will be fine - see [this comment](http://trac.sagemath.org/sage_trac/ticket/10637#comment:140) and others.