package_install: add checks for failure of remote file deletion during state shift