export global function
bugfix: invalid path when $template_dir is absolute path
version 0.07

- bugfix: invalid path when $template_dir is absolute path
- export global function