Create path and set value atomically.