Adapt build to work with the terms project as a Java project.
Made build script cross-platform.
Added some parameters to the build script.