phantomas.runScript: wait until it's finished

Fixes #417