Add tests to ensure that @AutoFactory works when applied to constructors

Also adds a fix that makes sure that it works.

Also, clean up some stray files generated by tests that should never have been committed.