Make list/read work.

XXX: hardlinks are handled incorrectly
XXX: file names should contain the full path