Encapsulate all graphical displays in if statements in RenderImages

As it stands, running RenderImages in a non-graphical MATLAB session will fail
when trying to use imshow(). This commit fixes this behaviour by only
displaying images and thumbnails in graphical mode.