root.sh: Only check for patched packages when installed
Not all architectures have all packages (e.g. we don't have flash-kernel on amd64) so check if a package is installed at all before checking if it's patched.
This unbreaks the qemu image build https://arm01.puri.sm/job/Images/job/Image%20Build/1664/console
WIP since tests are stil running