Fix FileStore flush() method.

To adapt to new FileStore structure introduced in #913.
Merge pull request #945 from cmenke/patch-6

[BugFix] FileStore flush() method.