Add detection of already installed resources. Fixes #5