fix problem with missing cache_dir, causing nil to String conversion error

Specifically, this in the logs:

```
TypeError (no implicit conversion of nil into String):
  app/controllers/photos_controller.rb:80:in `create'
  app/middleware/flash_session_cookie_middleware.rb:16:in `call'
```