Fix command argument appending function

Previously we always returned the first element. Now we return the
last one (the one we just allocated), which was intented in the first
place.
Merge pull request #297 from neithernut/fix-command-argument_appending

Fix command argument appending function