Fix for local paths with Unix / Windows Support

Second try at fixing issue #1272, now with added Unix support.
Merge pull request #1278 from losnir/master

Better fix for local path (cross-platform)