fix NA/rank-Z issues (issue #33)

rank-Z test disabled for prod(dim(Z))>1e6
tweaks to tests