Improved arrow navigation so that right arrow opens the first image and left the last, when no images have been opened before.