moved the pre-run handling of ImagePath and sys.path up to the Java lecvel