Merge pull request #101 from yankos/hotfix/directory_not_close