Also detect full temp dir, fixes #3559
Load plugins before purging packages, fixes #3557