Bugfixes

Fixed relative paths trying to write to root because I'm silly, fixed
last image string getting bugged (THANKS OBAM--ftruncate), and now, if
successful, the output (be it the latest images or all of them (in page
1)) go (each in a new line) to $output.

From then on you can do whatever you want with them.