py: Add very basic implementation of dir() builtin.

Only works on modules and class instances.