Avoid trailing whitespace in the JSON output

The default separators used in the Python JSON library's dump() write
output with trailing whitespace. Use custom separators to avoid that, as
described in the documentation:

  http://docs.python.org/2/library/json.html