Staples Q3 profit rises on cost controls