Fix bounds checking on cubic beziers to match specification.

Fixes #117