Master dir exploit fix

Check that the course_info.txt file is inside the course template directory.  This fixes a dangerous hole 
revealed by security scans.  This fixes bug #2996.