Use cache dir as <dir>/<pkg>/<checksum>; other tweaks