fix #572 Handle closed path in PathFitter

Here's a simple sample script to test these changes:
```javascript
var path = new Path.Star(
        new Point(50, 50),
        3,
        15,
        40
    );

path.fillColor = 'black';
path.simplify();
```