Bug fixing in library and application

* Moving the file removal before the end of memory. This way, one
should avoid quering for memory whenever it is not there.

* Solving a memory leak - the directory was not closed with closedir.

* Solving a minor problem in the statistics/performance generation. The
check on timestamps avoid to use uninitialized parts of the vector to
ask for statistics for job zero (where the start timestamp is zero but
also the job type is zero).

* When performance is unitialized return worst performance.

* Solving a logging issue in the application. The application will be
devoted a whole new serie of minor bug fixing and additional features.