[tools/mkpkg] make some tools a bit more versatile