Fix for U4-1285: Apostrophes in member groups cause exceptions

This pull request contains 3 fixes for related issues caused by member groups having an apostrophe in the name - allowing them to be created, renamed and deleted.