Close the URLClassLoader before reloading the resources.

#354
I think it would be good to also include "Failed to close the validator classloader." in the logged error message.