The issue of printing within the interpreter is easy to solve by redirecting stdout to a PrintWriter that writes to the interpreter.
WARNING: Couldn't flush user prefs: java.util.prefs.BackingStoreException: /home/albert/.java/.userPrefs/org/scijava/script/_!%g!a@"z!(@!bw"y!(k!.g"v!()!~w!u!(:!}w"p!'o!}@"2!'%!.g"w!'w!d@"n!'k!bg"z!#4!cw"j!()!a@"w!(@!a@"u!'c!.g"j!'w!bw"q!(`!cg"l!#4!@w"s!'8!ag"1!()!~@"^!':!cg"p!(!!d!"&!'4!~w"p!'4!~@== create failed.
@acardona made an issue report on the ImageJ Forum about the Script Interpreter: