package: added buildPackage and buildPackageToFile methods