tools: share getting program name from argv for all tools
8 files changed