A textiles firm will replace 49 UPVC windows in a listed Edwardian mill which were installed without planning permission.