South Africa's Dane Paterson took five-wickets to dominate Pakistan on day one of the first Test, but the tourists fought back to restrict the tourists to 3-82.