THIRD AMENDMENT TO CREDIT AGREEMENT and FIRST AMENDMENT TO AMENDED AND RESTATED SECURITY AND PLEDGE AGREEMENT