Fix quote() with special chars

Add some failing tests and fix them

I noticed that `'echo ' + quote(["'#"])` => `echo "\'\#"`
which produces: `\'\#` when run in bash, which is wrong.

We are escaping lots of things inside double-quotes that we don't need
to, which ends up including the \ before each escaped char.