[bug fix] process resource.fetch() for script files only
tmpl ast tools reworked
move all ast tools into lib/ast