[pubfile, get_dirents] fixed bugs & cleaned up the code, added get_group_repos ajax api