Fix minor readline/documentation issues

Hi,

This patch set fixes two very minor issues:

1. Error 500 from mathicsserver when browsing documentation that contains examples using `<dl>` tags
2. Missing line editing due to the way Python's `raw_input()` interacts with readline (fix from [this RedHat bugzilla bug](https://bugzilla.redhat.com/show_bug.cgi?id=448864#c15))

Thanks,
Ben