Anharmonicity and atomic distribution of SnTe and PbTe thermoelectrics