Sydney teacher on sex charges gets bail