Bugfix: only wrap big images in links if they're not already linked
Move around functions in script to aid understanding

I was writing a blog post about how this script works on resizing
images. This order made more sense.
New post about how this blog resizes large images