Refactor caching setup.

Use custom wrapping scripts for `bundle` and `npm`.