AMENDMENT NO. 6 TO CREDIT AGREEMENT AND AMENDMENT NO. 4 TO REGISTRATION RIGHTS AGREEMENT