Add support for subdomains and paths

Turned out to be hairier than I thought it would be to get right! Could be made a bit shorter by using lodash in the extension itself.

Also fixes a `TypeError` error when the funding value is `0`.