Added rootPath option to $location.

This will or will not work.