escape all metacharacters for bash
improve quoting for cmd.exe
more comprehensive shell testing