Use Path instead of String to store file paths.

Also fixes a race condition when opening files by checking
for the files existence by trying to open the file, instead of
checking beforehand, which can lead to a race.

Credit to @pythonesque for discovering the race condition.
Merge pull request #21 from reem/use-path-to-store-file-location

Use Path instead of String to store file paths.