Code Refactor

I have make the extension script more clear and easy to expand. And fix last commit bug (when flask-funnel to request the external script , postfix validate condition was wrong).

When I done this code. I find that more and more like flask-assets .