Fixed pkgver() function, fixed install of script