psola: fix memory problem (buffer overflow detected by valgrind)
math: add energy functions
pHTSbatch: fix script to run in Release mode and add a script for debug mode