At least 20 people have been injured after a factory making costumes for Carnival celebrations in Brazil caught fire.