Fix shell escaping of exported bash functions

Closes #29.