FIX: create intervening cache directories for ESP.

Also only load package.json for Esp applications.