Implemented getting/setting filetype in dir entries. Fixes #6. Fixes #7.