This seems like an ok way to validate addresses, canonicalize them, and model various bits of them for use by file handlers and helper scripts. It seems to handle URNs fine, too.