Use std::string for installing PKG files

Also now only refreshes, when it could open the PKG file.