Exhibit 10.4 REGISTRATION RIGHTS AGREEMENT Dated as of August 14, 1997