added read functionality to SparrowTestbedUtils and also corrected the writing of files to include EOF