Strip illegal characters from member roles in AMF uploads

Fixes #758
Strip illegal characters from member roles in AMF uploads, part 2

Fixes #758