Some fixes in Bernstein coefficient extraction algorithms

I've made some small fixes to the code for extracting Bernstein coefficients from LR splines. Just testing out pull requests for this... 

Oliver