FIRST AMENDED AND RESTATED MASTER CREDIT AGREEMENT DATED DECEMBER 30, 1997, EFFECTIVE AS OF JULY 31, 1997,