Caching

This adds caching for the locale JS assets and improves the diagnostic output when asset retrieval/caching goes awry.
Ok, this bit is done too. I think it's clearer now what's happening, but let me know what you think.