Fixing ddMd tests and memory usage reporting.
Added extra checks to AtomDistributor.