custom root path support

Now instead of just using the current path as the root for the URL, you
can specify one by giving a value to the attribute