Fixed getting the app dir when running as a jar file.