Added redirect generator

- Compile the templates only once not on each iteration of loop

Signed-off-by: Mansour Behabadi <mansour@oxplot.com>
Use markdown python module only

- More flexible misc processing
- Added else and elif to template processor

Signed-off-by: Mansour Behabadi <mansour@oxplot.com>