Fix an issue when generating tests for lowercase type names.
Fix issue with getting Table instances.

If a table instance is configured an exception will be thrown if you try
to reconfigure it. Use exists() to work around that issue.
Fix a few small issues when the type is 'controller'.
Fix testcase file name generation.

Prefixed controllers/other classes should have the correct tests
generated.