Find path in case we're outside the directory.

Not completely tested, but should work.
Merge pull request #10 from semenko/master

Find path in case we're outside the directory.