Escape more characters in path (fix #367)

Fix for #367.