Function connectPaths

Given a list of PathDatas, returns a PathData representing the union of these paths with lines connecting the start and end points.