There doesn't appear to be a way to do it. A workaround is to use a Gist to store such files (in my case a Bash script).
I will reassign to a better answer if someone comes up with a real solution.
Update: Use backticks to escape the escape char. See the new accepted answer.