Fix issue introduced with previous change.

Need to correctly account for 'false' being returned by target_exec if the
payload failed to execute on the target.  Also clarified the return value
from 'write_script_to_target' function.