Added even more features to the HPE, but the main change in this commit is
that I changed the test script from shell script to a platform independent
scala script. This change is due to the resource leackage in the previous
shell script.