Fixed bug in the new bvec/bval normalization code

I also improved the algorithm somewhat to avoid spurious scaling of
bvals/bvecs due to low-precision bvecs. E.g., if the bvecs are specified
with three decimal places, the bval could fluctuate by about .1% if the
scale factor is not rounded to the proper number of decimal places.