Read JSON accelerometer data and set the photo orientation in EXIF

Tested on OS X. Should also work on Linux.