Add quoting, remove backticks, use $PWD

* http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_03
* http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08

Fixes #46.

This does not handle quotes around `$@`. That is taken separately in #53.