For a sake a fast computation, I ran the example given in the skeleton file with a reduced version of the vessels3d =>V=V(1:128,1:128,1:128);
After final completion, if you display the skeleton along with an isosurface of the volume of interest (V), and rotate the figure, the skeleton seems to connect the three separated parts into one skeleton.
I think there should be some sort of check on whether the skeleton is passing a background area where there is no foreground voxels representing the blood vessel.
Unless I am doing something wrong, and if so, I will immediately apologize to you.
I also discovered a tiny mistake, easily solvable, in the example of your skeleton code (line 42 - commented):
%V = imfill(Vraw > 30000,'holes');
It should be V instead of Vraw.
Otherwise, thank you for sharing this code with us.