Added detailPackage and downloadPackage API and improved pkg package test