Mark Wood had Dane Paterson caught by Jos Buttler as he sealed his second five-wicket haul in Tests and skittled South Africa for 183.