Fix bug with single quotes in output format string.

Now allows the use of single quotes in a user-specified output format string
without throwing an error.