Any person,—
(i) who has been ordered under section 136 to give security for keeping the peace or for good behaviour; or
(ii) who is aggrieved by any order refusing to accept or rejecting a surety under section 140,
may appeal against such order to the Court of Session:
Provided that nothing in this section shall apply to persons the proceedings against whom are laid before a Sessions Judge in accordance with the provisions of sub-section (2) or sub-section (4) of section 141.