Tesla says it will update its battery software after two recent fires involved the Model S electric vehicles in Shanghai and Hong Kong.