Fixes #8210 - Adding caching for smart-proxy puppet classes using Stefan Julin's implementation of cache

Cache file will not be written to if cache_location directory doesn't exist or isn't a directory. I think you need to verify it the directory exists and create it if it doesn't.