Added command line processing to treebuild.
This is WIP.