Fix command line migrator
Re-enable the unit tests and fix
Merge pull request #5646 from edx/dhm/migrate_bug

Fix command line migrator