Heh, my daughter does this too. It is one of the reasons i'm working on potty training her. She is *mostly* trained, better for poop than pee. She seems to do it because she knows she has poop in her pants, and i think she is actually trying to help by putting it away, but she is inept. She used to take off her diaper out of boredom, but, right now i think it is more trying to get the dirty diaper off.
Anyway, we try to get her to poop in the potty at other times, so she doesn't at nap time. Then, at nap time, she wears an old pair of jammies with the feet cut off and the zipper up the back. She can't get them off, and she can't get at the diaper to cause problems. This helps.
I'm also talking to her a lot about hygiene in general, and how we need to keep ourselves clean. I emphasize that pee and poop in her pants will make her bottom hurt, and can make her sick if she doesn't put them where they belong. I suppose that may not help with the goal of leaving the poop in the diaper, but, i'm really just trying to get her to the point where she'll self-motivate to use the potty.
Good luck.
(Oh, and, i keep chlorox bleach wipes in the house for clean up purposes - don't use 'em for much else, but i want something disinfecting here. Dirty hands and clothes get water as hot as they can tolerate to clean.)