Be a bit more careful with the results of 'exec_action()' and also sanitize them a bit.

In case the 'exec_action()' call for 'get_target_list()' returned no
results, because there were no available targets, the module would
stacktrace.