improve goto_parent_dir function

* set the cursor to the file after goto_parent_dir
improve goto_parent_dir function

* import search function