Factored out 'joinSegments'.
Moved 'joinSegments' to 'Segments.py'.