SECOND AMENDMENT TO CREDIT AGREEMENT AND FIRST AMENDMENT TO SECURITY AND PLEDGE AGREEMENT