fix dir() call on a resource object in Python 3.2.x