Updated mergePaths to join paths with the same attributes & values.

Updated merge paths to join paths with all attributes the same (except "d").

Also joins paths that aren't closed (if both paths aren't closed).