Folding and Stability of a Primitive Protein