Fix expand-0062

The algorithm in http://tools.ietf.org/html/rfc3986#section-5.2.2 produces different results for IRI references starting with "../" etc.

@dlongley, let me know if you disagree.

This addresses #223.