Added tests to cover various scenarios for agreements and file downloads, addresses #62.