Split tests into per-media-type directories. Change sorting on many-to-many hal.