updated makefiles &  	a handler for the heap state shell command

Updated makefiles allowing a shell working with spaces in paths. And  a handler for the heap state shell command.