Effects:
Equivalent to
function(read_symlink(existing_symlink), new_symlink) or
function(read_symlink(existing_symlink, ec), new_symlink, ec), respectively,
where in each case function is create_symlink or
create_directory_symlink as appropriate.