Fix Directory Traversal Vulnerability #188

I have made a patch to the issue #188, by avoiding paths that have `..` characters.