remove deprecated use of path.exists as pointed to by @themightychris