Fix bug in handling of 5 arguments in Path2D polyfill's _writeData method

Plus assert that the method is only called with expected argument counts.

Fixes #1616.
Merge pull request #1617 from tschneidereit/master

Fix bug in handling of 5 arguments in Path2D polyfill's _writeData method