Avoid a sync when changing to the same folder

This now checks for the old folder value, makes sure it's not the same
as the current one, and then actually does the change.