added option to download ead including unpublished records to the frontend
added tests
improve exit condition in stream_out when dealing with an empty doc