Refactor for external scripts.  Bugfixes.

* External scripts are now matched by their protocols versus by a specific
  ext prefix.
* Bugfix for null user properties.
* Bugfix for cache paths including the file name.