imagej-omero: fix various problems

The script is tested and working well now on Ubuntu Linux.