Improve loader to make it work on rails 4

Solves:
https://github.com/Helabs/static_content/issues/13
https://github.com/Helabs/static_content/issues/12