BUG: Fix BFit crash when only one value is set for splineGridSize

This patch verifies that spline grid size has enough parameters.
If it has more than 3 parameters, only the first 3 parameters are used
for three dimensions.
However, if it has less than 3 parameters, the first parameter is used
for all three dimensions.
Merge pull request #167 from aghayoor/BFitBSplineGridSize

BUG: Fix BFit crash when only one value is set for splineGridSize