Added truncated hash test and fix for the Java version. There is now Travis building for the Java implementation. I fixed one puts msg in tests/test.rb
Fixed tests/runtests.sh for java compile.