Wrap an empty element of @$cmd with quotes, too.

Since @$cmd is being turned into a string, all elements need to be
identifiable in the resulting string.  Similar to the case of an element
solely consisting of whitespace, an empty element needs to be quoted in
order to be properly represented in the resulting string.

Signed-off-by: James McCoy <vega.james@gmail.com>
Merge pull request #2 from jamessan/empty-arguments

Wrap an empty element of @$cmd with quotes, too.
micro-optimization: don't use Symbol::gensym for perl >= 5.8.0
micro-optimization: execute less code if not debugging

especially the call to basename() is somewhat expensive.