Generalize dimensions of x samples

Determine the dimensions of x from the supplied x0.
Fixed error in construction of null model
Fixed lat bug in threshold.path