SECOND AMENDMENT TO AMENDED AND RESTATED FACILITY AGREEMENT AND FIRST AMENDMENT TO AMENDED AND RESTATED GUARANTY AND SECURITY AGREEMENT