computes footprint of program and copies BUILDCACHE_OUTPUTDIR to BUILDCACHE_CACHEDIR