Bug 1035133 - [TestAgent] Check that the TestAgent object is here and di...+shepherd

...splay an error message otherwise r=yurenju
I prefer to listen load and error event for css here, and furthermore we can replace the ```document.write('<link...');``` with ```var css = document.createElement('link');``` style.