escape hash keys if necessary

Fixes #7 but really could use some tests