Fix Sass cache marshaling issues

This PR hopefully finally fixes the issues with marshaling and the Sass cache ("Error encountered while saving cache...").

It's probably not perfect yet, but does fix all of the issues I have been experiencing, and works with gems such as compass-rails with only a few modifications (relating to compatibility with Sprockets master).