Sort passwords before saving them.