Guard against invalid $cache global

Using some of the models out of sequence fails due to bad encapsulation
and use of the $config global to cache.

    bundle exec rspec spec/unit/brightbox/*_spec.rb

would fail 78 times unless specs ran after the $config was setup and
leaked from another spec.

Now we only try to cache an identifier (adds a file for autocomplete to
find) if it exists.

The caching should really be split out anyway.
Merge pull request #42 from brightbox/caching_guard

Guard against invalid $cache global