Remove icon: check the $icon variable before removing the file

Without this check, it would be possible to remove any file...