Don't eat any visible mould, check the other mushrooms carefully, and you should be fine.
But make sure the shrooms are dry (practically brittle) before you store them. The reason they grew shit on them was because you didn't make sure they were dry. Air dry them in a dark place, without the use of heat. They might lose a bit of potency, but your health is worth it.
I had some home-grown shrooms sitting in my fridge for six months (in a flame-sealed cellophane package). Still good, and plenty potent.
~Ethno