Flush after writing in unix codec

Signed-off-by: John Else <john.else@citrix.com>
Add a basic unit test of the unix codec

Signed-off-by: John Else <john.else@citrix.com>