Fix top level class factory generation

FactoryWriter.getPackage() assumed that the fully qualified class name would contain a package and hence failed with a StringIndexOutOfBoundsException for top-level classes without a package.

Also bumps the compile-testing dependency to 0.6.