Self-catalyzed growth of S layers via an amorphous-to-crystalline transition limited by folding kinetics