encode commands with ascii. MacOSX complains about NULL bytes otherwise (I wonder why linux doesn't)