Add support for json files

This is along the same lines as #396 with a few tests added. Can add more if I have missed any.

Why it's needed: 

We have a handlebars template that is compiled on request using a mixture of dynamic and static json, we need a way of revving the files referenced in the static json.

-

Closes #396