WELLINGTON (Reuters) - A New Zealand court on Wednesday ruled that the search warrant used in the arrest of Megaupload founder Kim Dotcom on U.S. online piracy charges was legal, dealing a blow to the internet entrepreneur who is fighting extradition to the United States.