Make symlink swapping atomical