Fix folder selection and allow text-only changing of paths

As the second commit states, this also removes all the duplicate code from when directory listings were switched to the file finder.