Pakistan ex-PM Khan arrives in court after an unlawful arrest