Merged changes from rafali/flickr-uploader into upstream.