Make safe_open() treat trailing slashes like open().