Portage config cleanup

Some minor bug fixes to portage_config module and state.