Added regression tests for __dict__ attribute and partial support for metaclass __prepare__