Check if prefs file exists before writing to it

For some reason, writePrefs() seems to indiscriminately create new prefs files instead of checking first to see if the prefs file exists, thus leaving old projects in the dust in some cases. As a temporary solution, using a try-catch block to see if the file exists first before writing to it is probably the best way to go.