Fix compile time bug in buildElf

A paritially completed change to the section headers was submitted
which was crashing the build
Changes to allow make to run easily on a new system

The build directory can now be overwritten with an env. variable.

Make any missing export directories