Simplify code by using countargv() and freeargv() from libiberty.
 - Suggested by Tom Tromey.