Fix sync error with missing base directory set

Fixes #376