The command line you are using created a new thread that performs the task. PHP wont wait for it, as you do not refer the strout to php (but to /dev/null)
So, by changing the command, you can make PHP wait and thus get the result you expect.
Now I don't know for sure what the correct command is, but I would start with something like
$cmd = "/bin/bash $scriptfile"
Also have a look here. You want the opposite of what that guy wants. It does however give a bit more information about what the command actually does.