Simplify some code in ScriptTask::load.
auto merge of #4444 : Ms2ger/servo/load-simplify, r=jdm