Add Tests for renderer, markdown renderer and transcluder

Adding tests inevitably also means fixing things that were previously
broken. \o/