First finished version of EdfWriter with rewriting of EDFheader on StopRecord. Need to be tested!