AMENDMENT NO. 4 TO AMENDED AND RESTATED CREDIT AGREEMENT AND EXTENSION AGREEMENT