Web bugs april17th

A couple of small fixes:

To test:
 - Create a share and select it in the hierarchy under /webclient/public so that it displays in the right panel (previously this gave an exception).
 - Browse to webclient/basket or search results or history page. Select 1 or more Images and try to run a script, either via the scripts menu in top header and/or via the 'Publications' options above the right panel. The script dialog should be initialised with the selected images.