fix get_command_name() issue

Additionally, use exepath() if available. (exepath() was added by 7.4.235.)
Merge pull request #129 from k-takata/topic/fix-get_command_name

fix get_command_name() issue