Added error handling to updating the preservation metadata.
Added unit-tests for downloading files.