Backported the run scripts from 0.9.8:

- ensures proper handling of symlinks on Unix(-like) platforms;
- ensures proper way of finding Java on Windows platforms;
- ensures the correct name is used for the dock in OSX;