Add io.listdir method (code by Craig Forret)