Ported shell scripts to pure shell

Tested on Debian
Fixed entry point not being called

On Debian, it seems LD_PRELOAD does not call _init. Static initialization does
not work either. Ported to C++ to use call_once and initialize on first call.
Fixed hpm installation bootstrapping
Cleaned up Makefile