Fix self-intersecting mesh

Modelling for 3D-printing puts some requirements on your mesh. A mesh cannot intersect itself, for example.

I’m wondering if there are scripts to fix situations like this one:

http://i.imgur.com/wJBn0.png

http://i.imgur.com/miLp1.png

In this case, I’ve deformed a cylinder using an armature, and then converted to mesh. Unfortunately, some vertices are inside of the mesh.

I presume you want to retain the shape of the mesh? I that case you should select one of the edges that intersects the mesh, do an Edge Loop and then Edge Slide.