self.emit('writedone');
Add 'writedone' event

Signed-off-by: Mario Kozjak <kozjakm1@gmail.com>