This Python plugin splices together path strokes that have common end points, and properly closes strokes where the two end points overlap(*). In one mode ("Splice strokes in path") it will splice together the strokes in the current path. In the other mode ("Splice strokes in visible paths") it will splice together the strokes from all visible paths. This mode can be seen as an intelligent "Merge visible paths". Filters are accessed via menu entries in the right-click men in the Paths list ("Tools" submenu at the bottom).
Plugin is Here
(grab latest version):
(*) the actual criterion is that their coordinates differ by less that .1 pixel
Paths splce strokes