Updates parser to allow for more accurate URL parsing

Resolves issue #20, supercedes #21.  Kudos to @CMCDragonkai for catching the bug.