This modification changes the behavior of the function for degenerate distributions where `rank < dim`.

I tried to find a straightforward formula for degenerate multivariate normal distributions by googling the internet but it was not so easy.  I think the explanation of singular covariance matrices [here](http://www.stat.duke.edu/~km68/materials/214.3%20(MVN%20Theory\).pdf‎) is good, but I think the [explanation](http://en.wikipedia.org/wiki/Multivariate_normal_distribution#Degenerate_case) on Wikipedia is currently slightly wrong because it should raise 2 pi to the power k.