Use cache directory from context for tests

Let's see if Travis prefers this.