parse_url() bulletproofing and unittests