Add test js file and load it in dialog to see when its contents arrive

Want to refactor some of the code out of the dialog js file, so I need
to see when the contents of each scriptloaded file become available