Fix script loading for scripts with multiple classes.

The URLClassLoader was being closed, meaning classes not loaded initially could not be loaded on the fly.