SENIOR SUBORDINATED NOTE AND WARRANT PURCHASE AGREEMENT DATED AS OF JULY 19, 2002