Escape path string in order to handle paths with spaces, parentheses etc.