Fixed bug on CatmullRomSpline.js and wrote a new test case

This pull request fixes issue #650.

I'm not sure if the test case is appropriate but there is no page on the wiki about how to write test cases, if there's a problem, I'll appreciate feedback.