Update state before/after running the script
Update state before/after running the script

This means that the script is `started` only while the script is
running, and isn't affected by the boot/shutdown times of the backend
provider.

travis-ci/worker,henrikhodne-abandoned/worker,henrikhodne-abandoned/worker,henrikhodne-abandoned/worker,solarce/worker,travis-ci/worker,solarce/worker,solarce/worker,Acidburn0zzz/worker,travis-ci/worker,Acidburn0zzz/worker,Acidburn0zzz/worker