improving dir() + ipython behavior. Thanks @bfroehle for the tip at [the ipython thread](https://github.com/ipython/ipython/pull/3021#issuecomment-15554711)