Calling error() function raise exception and prevent cleanup() calling.
Fixed issue: cleanup() function not call in onerror handler.
This breaks a test. I'll take a look at it in the future, but I won't merge until the tests pass...
What was the negative side-effect of this? (Figuring out if this needs to be fixed.)
@jnewman error() function called before cleanup() and this means that cleanup never been called because error will stop program execution.
Looked through this. We'll need to move done() out of cleanup to make it pass on the CI. (What you have will fire the success handler when the script load failed.)