Ousted Pakistani PM seeks permission to appear in court