Fix course id detection; Fix directory traversal on download (brought in by "Add output dir command line argument v2", sorry =))