[refactor] Extract most functionality of complete_file() to Complete::Path