make sure group name is legal filename
unit tests, minor reorg