Fixing bug in assign_bbx_priors

And updating tex file. Bug involved using length() instead of size().
Length returns the longest dimension, not a particular dimension.