Improve loader to make it work on rails 4

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