Make image filenames relative to the label file

The image filenames written to the label files were absolute pathnames.
Change this to use filenames relative to the label file.
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
Merge pull request #79 from neingeist/fix-trailing-whitespace

Avoid trailing whitespace in the JSON output
Merge pull request #78 from neingeist/fix-relative-filenames

Add relative image filenames to the label file