Flush SharedPreferences changes so they are visible to all processes

Fix #78.