Code review

Code review + one fix in the export_roles_permissions_grant_permissions(...) function.
We still need to make sure that the exported code creates missing roles if any (see TODO in the code).
well, I found that export code has spaces and that's not very nice as this can show as difference. So it is better to check both export as well as import. it is not going to hurt.