AMENDMENT NO. 4 TO CREDIT AGREEMENT AND GUARANTY AND SECURITY AGREEMENT