Support array values in command

Description of command in CFN User Guide:

Either an array or a string specifying the command to run. If you use
an array, you do not need to escape space characters or enclose
command parameters in quotes.

So we escape double quote first, and enclose each array value in
double quote.

Fixes bug #1211605

Change-Id: I28ecdb0d4b8a12690dddeac4e2398264c6d6f212