Ensure cache path exists

In some Rails projects the tmp and/or cache dir is not committed to the git repository. In these cases starting the application fails with the error: 

```
Error: Errno::ENOENT: No such file or directory - /path/to/repository/tmp/cache/i18n-js.yml
```

This is fixed by making sure the `cache_path.dirname` exists before attempting to create the cache file.