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.