Refactored clever_build_ext, fixed minor render_mako_template_to bug.