South Africa's government has sought to reassure people living in Cape Town over its deployment of the army in the city, saying it is a temporary measure.