fixed bad agi detction regex in _sanitize_agis
fixed case sensitivity in _sanitize_agis
added more rigourous tests of _sanitize_agis
added strip() to _sanitize_agis, leading/trailing spaces now allowed in agis