Warnings on fclose

We are working on directories, so we should close directory instead of file-handle.. if not, it generates Warn-messages.