Cleaning company took franchise fees illegally, SJC rules