Fixes git export to support repositories with dots in their name and cleans export repo

First commit: 
Currently the export to git will cut off the "extension" of the repository name and export the courseware to the wrong directory. This corrects this behavior and adds a regression test to validate the fix.

Second commit:
If something is deleted in the remote repo for a course and it is exported from Studio the deleted items get added back in.  This corrects that behavior to clean the repo before exporting the course.