added support for sync writes through "/sync" option to "set" command

Hi,

Here is my patch, I hope it could be merged into master.

Thanks !