The effect of metallicity on the Cepheid Period-Luminosity relation from a Baade-Wesselink analysis of Cepheids in the Galaxy and in the Small Magellanic Cloud