Improve quoting and parsing of container commands