Avoid cyclic dependency
Fixed issues with POSTing from tests
Added course creation test
Refactor CLI testing code

And added a test for "admin course add"
Use CHISUBMIT_SUCCESS instead of 0