mattdrayer/rebase-20140926: Repaired faulty keygen logic
mattdrayer/rebase-20140926: Repaired faulty keygen logic

edx-solutions/edx-platform,edx-solutions/edx-platform,edx-solutions/edx-platform,edx-solutions/edx-platform