Fix UAS Unit Test, add --cleansettings cmd line

Fixed Issue #633, assuming  updating the value is the correct fix. Also adds a new --cleansettings command line option which is useful for debugging things. Also some general auto test cleanup.