fix restore of current working path when creating folders