updated demo for valve files

The spkpi-demo program has been updated to use the
valve files instead of calling 'water' directly.
Due to the rapid file reading and writing between
spkpi-waterd and spkpi-demo invalid values and glitches
were produced (one truncates, other reads empty file, ...).
To fix this file locking with flock() was used along
with truncate().