Test loading improvements

Improved test loading to be more robust than the regexps used to parse the source files. We needed this because we have tests with different filenames than the class in them with multiline class statements (see the testcase for this). We could improve the regexp to handle these cases, but I think this solution is more robust. Also it can be extended easily to support test files containing multiple test classes.