Fix filetype/1

Fix error for directories with name contain "." symbol