Modified compile script to create CACHE_DIR.