Added lua function "select_folder".

  This involved shuffling round the init-functions so that things
 were setup and it could work.