pk: Try to detect if a local file we are trying to install already is installed
So that maybe it can be marked as such when the file gets opened
Tested on Neon (and ArchLinux/alpm, where the feature isn't supported at all)
Edited by Aleix Pol Gonzalez