Escape whitespaces and backslashes in paths