Under section 4 of the Bail Act 1976, what is the general position of a defendant charged with a criminal offence who is brought before the magistrates' court?