Handle item terms and javascript properly on mygroups directory

Fixes #384. Fixes #385

Props @dcavins