fix a concurrency issue where in a multiuser env, g sync would fail because it lost permissions to a tmp file