extract some helper functions from the 'provision' command
initial sync_photos command
work on cli_spec failures
fix cli_spec
use Kernel.abort rather than fail per original implementation
add specs for sync_photos
add spec for unknown image format
use a Tempfile rather than defining hacky methods on StringIO for profile photo upload
fix accidental https => http
fix cli_spec to work with Tempfile change
add encoding to cli.rb
fix image type detection regex utf8 issue