of course:
so, where does it say they are beasts?
It does not say it there, unless you translate not men as beasts.
But here is what a scholar of the the Merkaz HaRav yeshiva has to say on the issue:
In this article R' Bar-Chayim discusses the attitude towards "Gentiles" in the Torah and in the Halacha and comes to an unambiguous conclusion: "The Torah of Israel makes a clear distinction between a Jew, who is defined as 'man,' and a Gentile." That is to say, any notion of equality between human beings is irrelevant to the Halacha. R' Bar-Chayim's work is comprehensive, written with intellectual honesty, and deals with almost all the aspects of Halachic treatment of non-Jews. It also refutes the statements of those rabbis who speak out of wishful thinking and, influenced by concepts of modern society, claim that Judaism does not discriminate against people on religious grounds. R' Bar-Chayim shows that all these people base their constructs not on the Torah but solely on the inclinations of their own hearts. He also shows that there are even rabbis who intentionally distort the Halachic attitude to Gentiles, misleading both themselves and the general public.
For the English readers' convenience we will briefly mention the topics dealt with in R' Bar-Chayim's article:
1. Laws in regard to murder, which clearly state that there is Halachic difference between murder of a Jew and of a Gentile (the latter is considered a far less severe crime).
2. A ban on desecrating the Sabbath to save the life of a Gentile.
3. A Jew's exemption from liability if his property (e. g. ox) causes damage to a Gentile's property. But if a Gentile's property causes damage to a Jew's property, the Gentile is liable.
4. The question of whether robbery of a Gentile is forbidden by the Torah's law or only by a Rabbinic decree.
5. A ban on returning a lost item to a Gentile if the reason for returning it is one's sympathy towards the Gentile and compassion for him.
6. The sum which a Gentile overpays in a business transaction due to his own error is forfeit; whether a Jew is permitted to intentionally deceive a Gentile is also discussed.
7. One who kidnaps a Jew is liable to death, but one who kidnaps a Gentile is exempt.
8. A Jew who hurts or injures a Gentile is not liable for compensation of damage, but a Gentile who hurts a Jew is liable to death.
9. One who overcharges a Gentile ought not return him the sum that the Gentile overpaid.
10. A Gentile -- or even a convert to Judaism -- may not be appointed king or public official of any sort (e. g. a cabinet minister).
11. One who defames a female proselyte (claiming that she was not virgin at the time of her marriage) is liable to neither lashes nor fine.
12. The prohibition to hate applies only to Jews; one may hate a Gentile.
13. One may take revenge against or bear a grudge towards Gentiles; likewise, the commandment "love your neighbor" applies only to Jews, not to Gentiles.
14. One who sees Gentile graveyards should curse: "Your mother shall be greatly ashamed..."
15. Gentiles are likened to animals.
16. If an ox damaged a Gentile maidservant, it should be considered as though the ox damaged a she-ass.
17. The dead body of a Gentile does not bear ritual impurity, nor does a Gentile who touches the dead body of a Jew become impure -- he is considered like an animal who touched a dead body.
18. One is forbidden to pour anointing oil on a Jew, but there is no ban on pouring that oil on a Gentile because Gentiles are likened to animals.
19. An animal slaughtered by a Gentile is forbidden, even if the ritual slaughter performed was technically correct, because Gentiles are deemed like animals. (Daat Emet does not agree that this is the Halachic reason for invalidating a Gentile's ritual slaughter -- but this is not the place to delve into the subject).
20. Their members are like those of asses" -- Gentiles are likened to animals.
21. Between the Jews and the Gentiles -- In the Aggadah, the Kabbalah, and in Jewish Thought
http://www.come-and-hear.com/supplement/so-daat-emet/index.html