Any person imprisoned in a county jail pending the appeal of his or her conviction of a felony and who has not obtained bail bond pending his or her appeal shall be transferred after thirty days but within forty days from the date judgment was entered against him or her to a state institution for felons designated by the secretary of corrections: PROVIDED, That when good cause is shown, a superior court judge may order the prisoner detained in the county jail beyond said forty days for an additional period not to exceed ten days.