prevent open file handles leak. fixes #9
Merge pull request #10 from omershelef/master

prevent open file handles leak. fixes #9