pdfapp.c - rethrow if the doc can't be opened.
main - add support for the command line
imageviewer - general cleanup