fix bug with whitespace around repository URL causing failure
fix inefficient query structure that performed a sparql query for each
user for each role, and then used the identifier anyway
move query functions up to RdfUtility