Fix #565: Move corejslib.js as a resource for the tools.

This simplifies the tools API.