To determine when to split the rope, you must look at the area that the rope covers each frame. What you do is you do a collision check with the area covered and your level geometry. The area that a swing covers should be an arc. If there is a collision, you need to make a new segment to the rope. Check for corners that collide with the swinging arc. If there are multiple corners that collide with the swing arc, you should pick the one where the angle between the rope during the previous frame and the collision point is the smallest.
Helpful diagram of the ninja rope situation http://i32.tinypic.com/168y0kz.png
The way you do the collision detection is that for the root of the current rope segment, O, the rope's end position on the previous frame, A, the rope's end position on the current frame, B, and each corner point P in a polygonal level geometry, you calculate (OA x OP), (OP x OB) and (OA x OB), where "x" represents taking the Z coordinate of the cross product between the two vectors. If all three results have the same sign, negative or positive, and the length of OP is smaller than the length of the rope segment, the point P is within the area covered by the swing, and you should split the rope. If you have multiple colliding corner points, you'll want to use the first one that hits the rope, meaning the one where the angle between OA and OP is the smallest. Use dot product to determine the angle.
As for joining segments, do a comparison between the previous segment and the arc of your current segment. If the current segment has swung from left side to the right side or vice versa, you should join the segments.
For the math for joining segments we'll use the attachment point of the previous rope segment, Q, as well as the ones we had for the splitting case. So now, you'll want to compare the vectors QO, OA and OB. If the sign of (QO x OA) is different from the sign of (QO x OB), the rope has crossed from left to right or vice versa, and you should join the segments. This of course can also happen if the rope swings 180 degrees, so if you want the rope to be able to wrap around a single point in space instead of a polygonal shape, you might want to add a special case for that.
This method of course does assume that you are doing collision detection for the object hanging from the rope, so that it doesn't end up inside the level geometry.