fix and test changing uids, add preserve_rdn param to save