Fix broken safe_open() when path contains double slashes.
Merge pull request #1129 from kacfengine/master

Fix broken safe_open() when path contains double slashes.