Any person who is arrested for a crime and who is refused bail shall, within 90 days after the date of confinement, be entitled to have the charge against him or her heard by a grand jury having jurisdiction over the accused person; provided, however, that if the person is arrested for a crime for which the death penalty is being sought, the superior court may, upon motion of the district attorney for an extension and after a hearing and good cause shown, grant one extension to the 90 day period not to exceed 90 additional days; and, provided, further, that if such extension is granted by the court, the person shall not be entitled to have the charge against him or her heard by the grand jury until the expiration of such extended period. In the event no grand jury considers the charges against the accused person within the 90 day period of confinement or within the extended period of confinement where such an extension is granted by the court, the accused shall have bail set upon application to the court.