build: Unlink checkout directory if base is local

If base is local the checkout directory is a symbolic link and we can't
remove it like it was a directory. In this case we simply unlink it.