Expanded dist2list function to work with 1D and 2D distributions.