Proper encoding of command arguments