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

It skips creation if the dir exists so I'll leave this for now