Only delete the installation folder if it is empty

Prevents deleting stuff added by end users in the root of the installation folder.