Fix path.exists deprecation

Jira: WP-1325
Merge pull request #9 from cbotsikas/WP-1325

Fix path.exists deprecation