This song belongs with other early attempts to point out the evils of racism. Unfortunately the language used, in itself, causes offence.
But that is how the language was back then. I doesn't make it right nor does it make it inoffensive. It's just the way it was.
Here's another