Solution for Instagram's "unshredder" challenge here: http://instagram-engineering.tumblr.com/post/12651721845/instagram-engineering-challenge-the-unshredder