Fix scripts being loaded on start even if they don't exist

Application::loadScript should not store a reference to a script until
it has been successfully loaded.  Previously if a script didn't exist it
would be "loaded" and show up in the running scripts window, but
wouldn't have been successfully loaded, and wouldn't be running anything
at all.
Fix invalid remote scripts being loaded
Merge pull request #3036 from huffman/19788

Code Review for Job #19788