Reimplement segment splitting in get_last_url() by using ssplit()