Julia, I had a similar problem, and even though I did the same thing - cleaning up well and try really hard to keep them alive, all but one died. I don't know what the black dots are, maybe a fungus. I'm sorry to hear it happened to you, I was sad for a while. They don't die right away, it takes a while. There was only one caterpillar left at the end, and he had one deformed foot upon "molting" where the "black" foot molted off him. Maybe yours will survive, I hope.