Handle closed path in PathFitter
Merge pull request #597 from byte-foundry/simplify_closed

fix #572 Handle closed path in PathFitter