Fixed workspaces sync subcommand.

This fix is related with #14 issue..

Bug fixed with related test.
Refactored sync method.