Add an -o / --targetpath option

This allows one to change the output directory for the build. This will be especially useful to scripts.
In addition, there is a small refactor which separate `BuildSettings` from `GeneratorSettings`, to make the later more lightweight to use.