Also, maybe this should be done before the `paths.map` call since the strings will be shorter then and probably quicker to sort.