Section 49. Sections forty-seven and forty-eight shall not apply to establishments used for the manufacture or distribution of gas, electricity, milk or water, to hotels, to the transportation of food, nor to the sale or delivery of food by or in establishments other than restaurants. This section shall not apply to railroads or railways as defined in section one of chapter one hundred and sixty.