leave chroot at the end

also write the mirror variable to /etc/pacman.d/mirrorlist