move data handling into the filestore

The data handling and persistence is pretty much bound to the
filehandling itself, as they have get converted to binary at the time of
writing to the file.

It is also now possible to write different kind of files through the
interface.