improve usability of the preview dialog
make filename and the "View" link triggers for opening dialog as well
support non-previewable images. closes #2