Added BSD license to source
Minor cleanup
Added a static initialization class that loads the ensureFn function
Added getcmdln function which parses an argv array for longoptions and arguments