Fix bug
Fix if there is a sub-folder with rst file, it will fail to edit and save it.