Man accused of stabbing dog appears in court