[fix] Added missing origin property.

Fixes #38

Also moved the `require(url).parse` out of the construction phase. It's a pointless performance hit and the require should be cached.