python: Rewrote SSI handler as a reusable module, and in Python3.