Strip illegal characters from member roles in AMF uploads

Fixes #758