Added a --rewrite option for the sync to update any distances, etc.