changes to URLTree to deal with urls that have trailing slashes