Remove existing file while handling dir (fixes #952)
Merge pull request #969 from AudriusButkevicius/dirfix

Remove existing file while handling dir (fixes #952)