Allow array and string for cmd

Examples:
"cmd": "/bin/bash"
"cmd": ["/bin/ls", "-la"]

This properly fixes #4.