add avg and sum to pdf_template
fix bug when filter_def.py is not exists
Merge pull request #31 from xiechao06/pdf_patch

add avg and sum to pdf_template