Paper over differences between GNU/BSD sed / cat

Mostly a convenience so that mustache.sh works on OSX.

Also a regression test for preserving backslashes, since it wasn't immediately obvious to me what the second `sed` pattern was doing in the mustache output I was testing.