Add write locking to Fifo
Add write locking to Fifo

This change is due to very rare and difficult to reproduce errors,
that might be caused by data corruption due to concurrent writes
to the named pipe.

lonkamikaze/bsda2,lonkamikaze/bsda2