Auto add the parent directory for an open file to project_data() when it is contained in the folder list

I have made two changes.

1. remove the confusion of the usage of the class `Pref` and its instance `pref`
2. Auto add the parent directory for an open file to project_data() when it is contained in the folder list.