Fix definitions for TS 0.9

Also make a change to the test runner so it doesnt check its own files and to remove the case sensitivity when detecting if a file is a test file or definition.