Tests: set tempdir in setup.
Implement sync command.