Fixed encoding of strings to only occur when writing files as json in response to Dan's code review.
Fixed encoding of strings to only occur when writing files as json in response to Dan's code review.

dollabs/pamela,dollabs/pamela