Make code safe for unicode course ids
Merge pull request #2400 from edx/zoldak/unicode-fixes-release

Make code safe for unicode course ids