Check earlier for the package cache

Else the additional packages never get decompressed.
Check the specified icon actually exists before trying to load

This ensures that we don't include the tmpdir in the logs.