Fix an assertion due to wrong argument in GlibStore

We should pass flags instead of mode to the function
flags_to_restrict_mode().
Merge pull request #204 from zhang-jingwang/master

Handle O_RDONLY, O_WRONLY and O_RDWR correctly in GlibIOStore
Merge branch 'master' of github.com:plfs/plfs-core into 2.4dev