Fix a bug where the edit command fails to open existing files.