In Path#join, add first segment of second path again at the end after joining, if it was closed.

Closes #249.