SIXTH AMENDMENT TO TERM LOAN, GUARANTY AND SECURITY AGREEMENT