devscript: support -t opt in list_running_app_ids

and refactor
Merge pull request #2803 from rolandwalker/running_app_test

devscript: support -t opt in list_running_app_ids