Execute remote and inline scripts sequentially

We need to make sure to run one script after the other to ensure that their dependencies are fulfilled. We need to do this manually because we can't rely on the provided browser functionality to remotely load these scripts.