Fix bug of Z close path behavior

SVG Spec about close path command:

The "closepath" (Z or z) ends the current subpath and causes an automatic straight line to be drawn from the current point to the initial point of the current subpath. If a "closepath" is followed immediately by a "moveto", then the "moveto" identifies the start point of the next subpath. If a "closepath" is followed immediately by any other command, then the next subpath starts at the same initial point as the current subpath.

Reference:
http://www.w3.org/TR/SVG/paths.html#PathDataClosePathCommand