add some error handling
catch exceptions from rmtree
Merge pull request #1 from flensrocker/master

Update