Make snockets behavior more Sprockets-like

When trying to compile a bigger Rails asset structure with snockets, I've found/fixed some things that differ from how Sprockets behaves (and fixed a bug on the way) — See attached commits.

I also added tests.

It would be great if you could merge this in to make snockets compatible to Rails projects :)