Make code safe for unicode course ids

@adampalay @mattdrayer 
This should make it OK to merge the release branch back into master.