Writes path data to SharedPreferences as JSON string