Men appear in court charged with terror offences