Growth mechanism and electronic properties of doped pyrite (FeS2) crystals