Restructure to work with new script file format.
Support to redirect to a resource in another package.