SIXTH AMENDMENT TO, AND WAIVER UNDER, AMENDED AND RESTATED CREDIT AGREEMENT AND SECURITY AGREEMENT