Fix memory leaks in simulatorPreferencesPath